package ca.skygazer.shared.coords;

import java.io.Serializable;

import javax.jdo.annotations.Extension;
import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;

import ca.skygazer.shared.account.SgUser;

@SuppressWarnings("serial")
@PersistenceCapable(detachable="true")
public class LatLonCoord implements Serializable {
	
	@SuppressWarnings("unused")
	@PrimaryKey
    @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
    @Extension(vendorName="datanucleus", key="gae.encoded-pk", value="true")
    private String encodedKey;
    
    @Persistent
    private String name;
       
    @Persistent
	public double lat=0;
    @Persistent
	public double lon=0;

    @Persistent
    private SgUser user;
	
	public LatLonCoord(){
	}
	public LatLonCoord(double lat, double lon){
		this.lat=lat;
		this.lon=lon;
	}
	public LatLonCoord(double lat, double lon, String name){
		this(lat,lon);
		this.name=name;
	}
	public String getName(){
		return name;
	}
	
}
